package com.dmxh.service.impl;

import com.dmxh.mapper.TbGoodsDescMapper;
import com.dmxh.pojo.TbGoodsDesc;
import com.dmxh.service.GoodsDescService;
import com.dmxh.vo.GoodsDescVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsDescServiceImpl implements GoodsDescService {

    @Autowired
    private TbGoodsDescMapper goodsDescMapper;

    @Override
    public GoodsDescVO queryGoodsDescByGoodsId(Long goodsid) {
        TbGoodsDesc goodsDesc = goodsDescMapper.selectByPrimaryKey(goodsid);
        GoodsDescVO goodsDescVO = new GoodsDescVO();
        BeanUtils.copyProperties(goodsDesc,goodsDescVO);
        return goodsDescVO;
    }
}
